CallForm

This command will transfer the user to another application. There is an option to return from the called application to the previous one, but if another CallForm command was issued to go to a third application first, then as each application is exited, the user will be brought back to each of  the previous ones until finally coming back to the original application. There is no limit to the number of “sub” applications that can be called.

The CallForm will fire at the end of the current event that the code is at. The CallForm function can only be called once per an event. If the ReturnFromCall is set to True, then on return, the form will fire the Form_OnReturn event. If you need to go to a different form as in-line code, then use the App.ShowForm function instead.

Group:  Application-based Extensions

Syntax: App.CallForm(ByVal FormName As String, [ReturnFromCall As Boolean = False], [SaveRSP As Boolean = False], [InitScreen As Boolean = False], [FormOptions] )

FormName               (String) The app form to be called. Select it from the pop-up list of forms when you enter "App.CallForm" and press the Tab key.

ReturnFromCall      (Boolean) Optional. True returns to the current application after collecting data in the called application. False remains in the called application. The default is False.

SaveRSP                   (Boolean) Optional. True retains the value in the current prompt's text field. The default is False.

InitScreen               (Boolean) Optional. True deletes the screens memory object prior to going to the application.

FormOptions           Optional. Is the whitespace delimited list.

Example:

Private Sub Form_OnFkey(ByVal KeyId As Long, ByRef Handled As Boolean) On Error Resume Next

' Each CallFrom will take the user to the expected Form after the Exit Sub

Select Case KeyId

Case 1

' Simple example, leaving the Calender From will return the user to this app App.CallForm("Calendar", True)

Case 2

' Simple Example, leaving the ErrorPage Form will return user to their menu App.CallForm("ErrorPage")

Case 3

' Complex example, will take user to the ProcessingPage app with the ActionCode and Format options

' Will return user to this form when they are done in ProcessingPage app App.CallForm("ProcessPage", True, True, , "-ActionCode=0560 -Format=mmDD-YYYY")

End Select

End Sub

Versions Supported:       RFgen 4.0 and newer.

Notes:      See also App.ShowForm. The syntax may be different in order versions.